

package com.hazelcast.config;

import java.util.Set;

/**
 * Interface defining methods used to configure trusted interfaces (source IP addresses).
 *
 * @param <T> implementing class type
 */
public interface TrustedInterfacesConfigurable<T extends TrustedInterfacesConfigurable<?>> {

    /**
     * Adds trusted interface (i.e. source IP address or expression).
     *
     * @param ip IP address to be added.
     * @return configuration object itself
     */
    T addTrustedInterface(String ip);

    /**
     * Gets the trusted interfaces.
     *
     * @return the trusted interfaces
     */
    Set<String> getTrustedInterfaces();

    /**
     * Sets the trusted interfaces.
     *
     * @param interfaces the new trusted interfaces
     * @return configuration object itself
     */
    T setTrustedInterfaces(Set<String> interfaces);
}
